package org.elj.jeasyexcel.structure.impl;

import org.elj.jeasyexcel.structure.Body;
import org.elj.jeasyexcel.structure.Content;
import org.elj.jeasyexcel.structure.Footer;
import org.elj.jeasyexcel.structure.Header;
import org.elj.jeasyexcel.structure.StructureFactory;

public class ContentImpl implements Content {

	private static final short DEFAULT_START_ROW = 0;
	private static final short DEFAULT_START_COLUMN = 0;
	private Body body;
	private Header header;
	private short startRow;
	private short startColumn;

	public ContentImpl() {
		startRow = DEFAULT_START_ROW;
		startColumn = DEFAULT_START_COLUMN;
	}

	@Override
	public Body getBody() {
		if (body == null) {
			body = StructureFactory.getEmptyBody();
		}
		return body;
	}

	@Override
	public Footer getFooter() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Header getHeader() {
		if (header == null) {
			header = StructureFactory.getEmptyHeader();
		}
		return header;
	}

	@Override
	public void setBody(Body body) {
		this.body = body;
	}

	@Override
	public short getStartColumnNumber() {
		return startColumn;
	}

	@Override
	public short getStartRowNumber() {
		return startRow;
	}

	@Override
	public void setStartColumnNumber(short startColumn) {
		this.startColumn = startColumn;
	}

	@Override
	public void setStartRowNumber(short startRow) {
		this.startRow = startRow;
	}

}
